package com.seven.good.service.impl;

import com.seven.good.dao.SmsremindMapper;
import com.seven.good.exception.DaoException;
import com.seven.good.exception.ServiceException;
import com.seven.good.pojo.Smsremind;
import com.seven.good.service.SmsremindService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <h3>easyauction</h3>
 *
 * @author : 王胜奔
 * @description : SmsremindService接口的实现类
 * @date : 2019-10-17 19:13
 **/
@Service
public class SmsremindServiceImpl implements SmsremindService {
    @Autowired
    private SmsremindMapper smsremindMapper;

    /**
    * @Description: 向短信提醒表里添加数据
    * @Param:  Smsremind对象
    * @return:
    * @Author: lenovo
     * exception:
    * @Date: 2019/10/17 19:15
    * Version: 1.0
    */
    @Override
    public void saveSmsremind(Smsremind smsremind) {
        try {
            smsremindMapper.insertSelective(smsremind);
        }catch (DaoException e){
            e.printStackTrace();
            throw new ServiceException("系统维护中");
        }
    }

   /**
    * @Description: 查询出短信提醒表里所有数据
    * @Param:
    * @return:  list<Smsremind>对象
    * @Author: 王胜奔
    * exception:
    * @Date: 2019/10/17 19:50
    * Version: 1.0
   */
//    @Override
//    public List<Smsremind> getSmsreminds() {
//        List<Smsremind> smsreminds=smsremindMapper.selectSmsreminds();
//        return smsreminds;
//    }


}
